package com.hcc.gateway.domain.enums;

/**
 * ProtocolEnum
 *
 * @author shengjun.hu
 * @date 2022/1/5
 */
public enum ProtocolEnum {

    DUBBO("dubbo协议"),
    HTTP("http协议");

    private final String desc;

    ProtocolEnum(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public static ProtocolEnum getByName(String name) {
        for (ProtocolEnum value : ProtocolEnum.values()) {
            if (value.name().equals(name)) {
                return value;
            }
        }
        return null;
    }

}
